package com.mar.meclient.util.ui;
/**
 * Role : controller
 * @author mar
 */
public interface IPageNavigator {
	
	/**
	 * Page is completed. Go to next page.
	 * @param from
	 * @param pageResult
	 */
	void navigateNext(IPage from, Object pageResult);
	
	/**
	 * Return to previous page.
	 * @param from
	 */
	void navigateBack(IPage from);
	
	/**
	 * Is called no notify navigator that a critical exception has been caught
	 * and page could not handle it or continue it job.
	 * @param page
	 * @param e
	 */
	void navigateOnCriticalException(IPage page, Exception e);
	
	/**
	 * Is called to show some kind of alert message. Page could handle this
	 * exception and delegates to navigator only 'show message' task.
	 * @param page
	 * @param message
	 * @param e
	 */
	void showPageProblem(IPage page, String message, Exception e);
}
